//
// Created by Administrator on 2021/5/21.
//

#include "iostream"
using namespace std;

int main(){

    //选择结构 - 多行if语句
    //用户输入分数，如果分数大于600， 是为考上一本大学，输出

    //1.input a score
    int score = 0;
    cout << "please input a score:" << endl;
    cin >> score;

    //2.notice
    cout << "a score you put is:" << score << endl;

    //3.if
    if (score > 600){
        cout << "Congratulations!" << endl;
    } else{
        cout << "No pass!" << endl;
    }

    //if-structure 多条件if语句
    //输入一个考试分数，如果大于600分，视为考上一本大学
    //大于500
    //大于400
    //小于400

    //1.input a score
    int score1 = 0;
    cout << "please input a score:" << endl;
    cin >> score1;

    //2.score
    cout << "score is:" << score1 << endl;

    //3.if
    if (score1 > 600){
        cout << "first-tier university" << endl;
    }
    else if (score1 > 500){
        cout << "second-tier university" << endl;
    }
    else if (score1 > 400){
        cout << "third-tier university" << endl;
    } else{
        cout << "no pass!" << endl;
    }

    //嵌套if语句
    //提示用户输入一个高考分数，根据分数做出如下判断
    //分数如果大于600分视为考上一本，大于500考上二本，大于400考上三本，其余视为未考上本科
    //在一本分数中，如果大于700，考上北大，大于650，考入清华，大于600考入人大

    //1.input a score
    int score2 = 0;
    cout << "Please input a score: " << endl;
    cin >> score2;

    //2.notice
    cout << "The score is: " << score2 << endl;

    //3.if
    if (score2 > 600){
        cout << "first-tier university" << endl;
        if (score2 > 700){
            cout << "Congratulations on entering Peking University" << endl;
        }
        else if (score2 > 650){
            cout << "Congratulations on entering Tsinghua" << endl;
        }
        else if (score2 > 600){
            cout << "Congratulations on entering National People's Congress" << endl;
        }
    }
    else if (score2 > 500){
        cout << "Second-tier university" << endl;
    }
    else if (score2 > 400){
        cout << "Third-tier university" << endl;
    } else {
        cout << "No pass!" << endl;
    }

    system("pause");

    return 0;
}